//数据字典api模块
import request from '@/utils/request'
export default{
    listByDictCode(dictCode){
        return request({
            url:`/admin/core/dict/list/${dictCode}`,
            method:'GET'
        })
    },
    save(data){
        return request({
            url:`/admin/core/dict`,
            method:'POST',
            data
        })
    },
    updateById(data){
        return request({
            url:`/admin/core/dict`,
            method:'PUT',
            data
        })
    },
    getById(id){
        return request({
            url:`/admin/core/dict/${id}`,
            method:'GET'
        })
    },
    deleteById(id){
        return request({
            url:`/admin/core/dict/${id}`,
            method:'DELETE'
        })
    } ,
    //根据pid查询下一级数据字典集合
    listByPid(pid){
        return request({
            url:`/admin/core/dict/parent/${pid}`,
            method:'GET'
        })
    }    
}